// dlg.txt

//MK Edit
//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 48;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "You approach the base of the Fangs of Judgment. The ancient walls loom above you, enormous blocks of mountain stone carefully fitted together. It's a remarkable structure, honestly far more impressive than you thought the Ro would be able to create.";
	text2 = "The main issue is that it is sealed against you. The gates are closed. Nobody is visible behind them. Your passage into the northern half of the High Litha has been blocked.";
	text3 = "This is forbidden. Haven's vassals are not allowed to block the travel of its representatives, especially royalty. Something very strange is happening.";
	text4 = "Perhaps the scout standing by the gate can tell you more.";
	code =
		sf(this_town,1,1);
		toggle_quest(11,4);
		if (gf(48,13) > 0)
			rs(4);
		if (gf(80,12) < 3) {
			toggle_quest(20,1);
			sf(80,12,3);
			}
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "You slip through the charred crack and enter the fortress. You keep your blade drawn, expecting to meet guards. You do, but not what you expected.";
	text2 = "No humans are visible. They all abandoned the fortress. As you enter, however, shades emerge from the ground. They float up through the ground and take up positions watching you.";
	text3 = "Some of them guard the small barn to the west. Others guard the gate to the north. They are the dead of the Ro, armed and waiting for your approach. But who summoned them, and whose commands will they answer?";
	code =
		sf(this_town,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0;
	text1 = "This was the main hall of the Fangs of Judgment. It served as a trading post, a refuge for travelers, and a place for Ro duels and diplomacy. Now it has been abandoned to whatever force prevents you from entering the highest peaks of the Ro.";
	text2 = "Whoever is in control here, they didn't win the fort without a fight. The air is full of smoke, and a large portion of the hall burned down. None of the defenders are visible. It's worryingly silent.";
	code =
		sf(this_town,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "You enter a long hall, full of rubble and scorch marks. This is where those loyal to Haven made their final defense when your enemies took control.";
	text2 = "It has been set up now as a magical workshop, where the shades can be summoned and mastered. There are small stone circles all along its length. When you enter the hall, shadowy specters of humans and beasts begin to coalesce on them, mindless constructs ready for the hunt.";
	text3 = "A lone man stands at the far end of the gallery, waiting for you. At last, you can confront a rebel face to face.";
	code =
		sf(this_town,4,1);
				spawn_creature(4841);
				set_name(4841,"Shadow Wolf");
				spawn_creature(4843);
				set_name(4843,"Shadow Wolf");
				spawn_creature(4844);
				set_name(4844,"Shadow Lithan");
				spawn_creature(4846);
				set_name(4846,"Shadow Drake");
				run_text_on_char(4841,"New shadow!",0);
				run_text_on_char(4843,"New shadow!",0);
				run_text_on_char(4844,"New shadow!",0);
				run_text_on_char(4846,"New shadow!",0);
		set_summon_level(4841,2);
		set_summon_level(4843,2);
		set_summon_level(4844,2);
		set_summon_level(4846,2);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "At last, you emerge from the northern gates of the Fangs of Judgment. Your reward: A huge expanse of icy wasteland, extending across a misty sheet of ice and ending at jagged, uncrossable mountains.";
	text2 = "Somewhere ahead, the Raasa of these mountains is waiting for you. Once you find him and get his request, you will finally be able to go home. Your mission may finally be near its end.";
	code =
		sf(this_town,5,1);
		sf(80,12,6);
		award_party_xp(MED_QUEST_XP);
		toggle_quest(11,5);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "You hear something behind you. Not much. Just a single, quiet click. Like the closing of a door. You tighten your grip on your weapon. Someone has emerged behind you.";
	text2 = "Their stealth was nearly perfect, but you were trained by the finest warriors in Haven. Nearly perfect isn't enough to trick you.";
	code =
		sf(this_town,6,1);
		sf(48,12,1);
		activate_hidden_group(4);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "You moved cautiously into the upper floor, watching for the inevitable ambush. It doesn't happen in this room.";
	text2 = "The warriors attacking you are all old Rokaj, here to end their lives taking part in some sort of doomed rebellion. You found no signs of who they were or who sent them.";
	text3 = "It is still unclear why this meaningless resistance is happening. Ro are sacrificing themselves to oppose you. The Queen may have underestimated their hatred of you.";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "You give the door a good shove, but it is completely blocked. Charred timbers are probably holding it shut on the other side.";

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "The door is securely locked from the inside. Considering the chaos of the situation, you won't be able to concentrate on getting it open. You'll need the key.";

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "We prepare.";
	text2 = "Talk to Vasilo.";
	text3 = "We have our orders!";
	action = SPEECH_BUBBLE;
	code =
		cs();
		as(get_ran(1,1,3));
	break;

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "Your mages engage in a long, intricate ritual. The ground shakes under your feet, gently first, then harder. The air fills with the reek of sulfur. The four of them lean forward and join hands.";
	text2 = "A lance of fire bursts forth and slices into the wall. Vasilo did, indeed, discover a weak spot, full of interior holes. Soon, they have lanced a narrow passage into the Fangs of Judgment.";
	text3 = "Once the spell concludes, the warriors pack up their goods very quickly. Counsel Vasilo says, _We have our orders. The Ro will be angry. We are to return to [F5] as quickly as possible. We wish you good hunting, [P]._";
	text4 = "Minutes later, they are gone. The smoldering tunnel into the fort awaits.";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "When you deliver the final blow to Misttalker Thoma, he crumples to the ground. In his final moments, he doesn't look like a mighty hero or judge. Just a weak, tired old man, dying alone far from home.";
	text2 = "He looks up at you and whispers, _No hope. The war must come._ Then he is gone. You have retaken the fortress.";
	text3 = "When he fell, something made of metal falls out of his pouch. It's a key. You take it.";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "Now that you have passed the Fangs, it has been resettled. The workers, merchants, and guards have returned. When you talk to them, they are polite and reserved.";
	text2 = "They have no useful information. They offer no trade. When you ask about the warriors who ambushed you here, they claim to know nothing about it. They say many kind things about Haven, none of which seem sincere.";
	text3 = "At least Haven can pass freely now. There is nothing else you can achieve here.";
	
begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You meet a young woman of the High Litha, armed with a short sword and dressed in light armor. She is ready to travel fast and light. When she sees the insignia on your shoulder, surprisingly enough, she walks up to you and bows.";
	text2 = "_I am honored, [P]. I am Scout Halki, serving the mighty army of Haven. I have investigated this obstruction and can make a report._";
	text5 = "In your absence, Scout Halki returned to continue watching the fortress. She turns and smiles. She is strangely outgoing for a High Lithan, and she shows the dedication to duty of a proper soldier of Haven.";
	action = INTRO;

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "_Greetings, Scout. You are out here alone?_";
	text1 = "_Of course. That is the way of scouts here. Don't worry. This fort is quiet enough, as long as I'm willing to stay outside._";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "_A High Lithan serving the army of Haven?_";
	text1 = "_Of course! Many of us see the safety and wealth that Haven brings to us. And will give all to preserve it._";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_Give me your report._";
	text1 = "_Gladly. As you can see the Fangs of Judgment have been sealed. Nobody is being allowed in. All the guards are gone._";
	text2 = "_There are signs of a fight inside. Whoever lost control, they didn't go peacefully._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Can I scale the wall?_";
	text1 = "_It would be difficult. Even if you did, you would likely be trapped inside._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Why are the Ro allowed to have a wall here?_";
	text1 = "She shrugs. _That is a decision for a [P], not a scout._";

begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_Is that unusual?_";
	text1 = "_It is. I have never seen these gates closed. Especially not to a Havenite. It is shocking. It is a provocation, a dangerous one._";
	text2 = "_If you need to pass, it will be difficult._";

begintalknode;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "_How can I get past?_";
	text1 = "She thinks about this. _I don't know. It will require force, and I don't want to recommend that. I don't want war, especially inside my homeland._";
	text2 = "_You should report this to your Governor in Jajayim. That is all I can say._";

begintalknode;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "_Thank you for the report._";
	text1 = "_I am honored to have done my duty._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_I would like more information._";
	text1 = "_I'm sorry, but I've told you all I know. Your Governor would know much more._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_You are dismissed._";
	text1 = "She salutes. _I will continue to explore the valley. I will try to learn more of value._ She runs off to the south. It is remarkable how quick and sure she travels over the ice.";
	action = END_TALK;
	code =
		erase_char(4800);
	break;
	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "There is a line of Havenite mages here, carefully inspecting the base of the wall. You recognize their leader, Counsel Vasilo. The magical engineer. He is examining the stone with a gleeful grin, wondering how best to tear it down.";
	text2 = "When you get close, he turns and salutes you. _Welcome, [P]. Happy to see you. If you are still interested in getting through this barrier, I think that we can be of assistance._";
	text5 = "Counsel Vasilo and his war mages continue to poke at the wall, looking for the best possible weak point.";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = gf(48,14) > 0;
	question = "_I need to talk to you._";
	text1 = "_My apologies. Our spell has begun. We need to concentrate. Too late to back out now._";
	action = END_TALK;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = gf(48,14) == 0;
	question = "_Tell me about the situation._";
	text1 = "_It is as I was told. Some sort of rebel is inside the fortress, keeping you from passing. Can't be tolerated. Has to be dealt with. Pity to destroy such a pretty old wall, but it's their fault._";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = gf(48,14) == 0;
	question = "_Have you had any resistance?_";
	text1 = "_Not a bit. We're here with a good protective force, ready to fight. Nobody has come out. We haven't heard a sound._";
	text2 = "_Don't be fooled, though. I'm sensing powerful magic on the other side. There are defenses, be assured._";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = gf(48,14) == 0;
	question = "_Can you get me through this barrier?_";
	text1 = "_Absolutely! Give us the word, stand back, and we'll punch a nice hole through this wall._";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = gf(48,14) == 0;
	question = "_Stay put for now._";
	text1 = "_Hmmm. All right._ None of the soldiers are happy about this. They are exposed, and it is cold. Still, they know their duty.";
	text2 = "_We'll be here for as long as we need to, [P]._";
	action = END_TALK;
	
begintalknode;
	state = 41;
	nextstate = 42;
	condition = 1;
	question = "_What are you going to do?_";
	text1 = "_Well, we considered blowing up the gate. Seems the obvious move, to an amateur. It's kind of tricky, though, and we'll want that gate when we retake the fort._";
	text2 = "_So we'll be going straight through the wall here. There are structural weaknesses that make it feasible. A bit of flash, and you'll be in._";
	
begintalknode;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "_What will the Rokaj think of this action?_";
	text1 = "_Us blowing up a chunk of this ancient, sacred wall? Well, I imagine they'll be pretty angry._";
	text2 = "_Still, they forced it. They sealed us off knowing we'll be forced to do exactly that. Sad to say, they made this choice for us, and the Queen gave the order._";

begintalknode;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "_Make a hole in the wall._";
	text1 = "The warriors leap to attention. Everyone is very excited. This is what they have been waiting for. Vasilo says, _All right. I'm going to need for you to step back please._";
	text2 = "You move to a safe distance, the soldiers make a defensive perimeter, and the mages begin their spell.";
	action = END_TALK;
	code =
		sf(48,14,1);
	break;
	
begintalknode;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "_I'm not ready._";
	text1 = "_Hmmm. All right._ None of the soldiers are happy about this. They are exposed, and it is cold. Still, they know their duty.";
	text2 = "_We'll be here for as long as we need to, [P]._";
	action = END_TALK;

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = "As the illusions continue to form behind you, becoming solid and walling you in, this man of the High Litha steps forward to face you. He is very old and frail. You can see why he selected this mission. He is very near the end of life.";
	text2 = "_We acted, you answered. [P], the Rokaj has seen your resolve. I am Misttalker Thoma. Here, I make my final stand._";

begintalknode;
	state = 70;
	nextstate = 71;
	condition = 1;
	question = "_Are you the one who kept me out of here?_";
	text1 = "_I did not act alone, of course. I received my orders. Those who helped me left. I used my power, the last scraps of it, to hold the gate. My mission is ending._";

begintalknode;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "_Did you create the shades outside?_";
	text1 = "_Yes, after we took over this keep and drove everyone out. In the Ro, even the dead rise up to spit out their hate at Haven._";

begintalknode;
	state = 71;
	nextstate = 72;
	condition = 1;
	question = "_Who told you to stop me?_";
	text1 = "_I think you have spoken to him. If not, you will. He is the Wolf. The predator of the mountains, who hunts you._";

begintalknode;
	state = 72;
	nextstate = 71;
	condition = 1;
	question = "_The Wolf?_";
	text1 = "_The mirrors in your forts? Use them. He will have much to say. Don't worry. He does not want destruction. He wants justice._";

begintalknode;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "_I need to talk to Raasa Suharum._";
	text1 = "_That is what we were afraid of. We are doing a favor to all by keeping you from talking to him. That was our mission here._";
	text2 = "_Someday, you will see what a mistake you made._";

begintalknode;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "_You attempted to kill the [P] of Haven. You are sentenced to death, sentence to be carried out immediately._";
	text1 = "He bows his head. _So that is how it is going to be. I swear I tried to prevent this. Now it will be blood until the end._";
	text2 = "_Your death is the only hope for us now. I will spend the last of my power._";
	action = END_TALK;
	
begintalknode;
	state = 71;
	nextstate = 75;
	condition = 1;
	question = "_Why did you try to stop me?_";
	text1 = "_Because there is nothing you can do now. Even if you have dreams of justice, it will be too late. Once you talk to the Raasa, the boulder will begin rolling downhill, and it will crush my land._";
	text2 = "_I have been trying to save you._";

begintalknode;
	state = 75;
	nextstate = 73;
	condition = 1;
	question = "_You think you are doing me a favor?_";
	text1 = "_I do. You think the Wolf would throw my life away so cheaply? Me, who advised him for so many years? Yes, I am helping us all. Haven must go. The only hope for this happening without horrible bloodshed is for you to just turn back._";

begintalknode;
	state = 73;
	nextstate = -1;
	condition = 1;
	question = "_What is the reason I should turn back?_";
	text1 = "_I can't say more. You come to talk to Raasa Suharum. I say that you must not, even if your Queen commands it._";

begintalknode;
	state = 73;
	nextstate = -1;
	condition = 1;
	question = "_The Queen commands that I meet with Raasa Suharum. I can't leave until I do._";
	text1 = "_We knew that this was possible, but not inevitable. We hoped that your Queen would just allow you to leave. Perhaps my mission was always doomed._";

begintalknode;
	state = 73;
	nextstate = 74;
	condition = 1;
	question = "_I will be just to the Rokaj, but you need to let me by._";
	text1 = "Mistwalker Thoma looks at you intensely. Now that he is facing you for the first time, he tries to see into you, to understand what you actually want.";
	text2 = "_Maybe ... Maybe we have been too pessimistic. Maybe there is a path to justice. Maybe you should talk to the Raasa._";

begintalknode;
	state = 73;
	nextstate = -1;
	condition = 1;
	question = "_You must let me by. You have no choice._";
	text1 = "He bows his head. _So that is how it is going to be. I swear I tried to prevent this. Now it will be blood until the end._";
	text2 = "_Your death is the only hope for us now. I will spend the last of my power._";
	action = END_TALK;
	
begintalknode;
	state = 74;
	nextstate = -1;
	condition = gf(80,16) >= 140;
	question = "_I promise that I will bring justice to the Ro._";
	text1 = "Thoma thinks about this. _I have heard much about you, about your words in defense of the Ro. I think, maybe, you have earned a scrap of trust._ He removes a key from a pouch and tosses it to you.";
	text2 = "_I will withdraw. The shades will trouble you no more. I will let you speak with the Raasa. I only hope that you tell the truth._";
	text3 = "The illusions fade. He turns, walks through the door to the east, and is gone.";
	action = END_TALK;
	code =
		sf(48,11,1);
		erase_char(30002);
		erase_char(30008);
		erase_char(4847);
		set_spec_item(7,1);
		clear_town(48);
	break;
		
begintalknode;
	state = 74;
	nextstate = 73;
	condition = gf(80,16) < 140;
	question = "_I promise that I will bring justice to the Ro._";
	text1 = "Thoma thinks about this. _I have heard much about you, about your words regarding the Ro. It takes much to earn our trust. You have not done so. Perhaps you will, but ... No. The Rokaj has only one hope now. I need to be resolute._";
	text2 = "_These are my final moments. I will not fail in my duty._";
	
begintalknode;
	state = 74;
	nextstate = -1;
	condition = 1;
	question = "_You are still our vassal. You signed a contract with Haven. We require submission._";
	text1 = "He bows his head. _So that is how it is going to be. I swear I tried to prevent this. Now it will be blood until the end._";
	text2 = "_Your death is the only hope for us now. I will spend the last of my power._";
	action = END_TALK;
	

//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				